// 配置路由的地方

import Vue from 'vue';
import VueRouter from 'vue-router';

// 使用插件

Vue.use(VueRouter);

// 引入路由组件
import Home from '@/views/Home/Home.vue'
import Search from '@/views/Search/Search.vue'
import Login from '@/views/Login/Login.vue'
import Register from '@/views/Register/Register.vue'

export default new VueRouter({
    // 配置路由
    routes:[
        {
            path: '/home',
            component: Home
        },
        {
            path: '/search',
            component: Search
        },
        {
            path: '/login',
            component: Login
        },
        {
            path: '/register',
            component: Register
        },
        {
            path: '*',
            redirect: '/home'
        }
    ]
})


